home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cream of the Crop 3
/
Cream of the Crop 3.iso
/
comm
/
tm4dhost.zip
/
TM4DHOST.SCR
< prev
next >
Wrap
Text File
|
1993-11-27
|
46KB
|
1,228 lines
; Original Host Script done by "TSUNG HU", The Telemate Author.
; THE PROCEDURE "ShowScreen" IS COPYRIGHTED by "Ed Kapuscinski jr".
; I RETAIN ALL RIGHTS TO IT NOW AND IN THE FUTURE.
; I am "Ed Kapuscinski Jr", and I am the Author of this Script!
; The latest revision date of this script is NOV. 28, 1993
; Everything in this script file has been tested and found sound.
; This Script File works as Perfect as I could get it to.
;
; IF YOU ARE "NOT" EXPERIENCED IN TELEMATE SCRIPT LANGUAGE.
; Please, Don't change any code that is there for a reason!
;
; I WILL NOT BE RESPONSIBLE FOR ANY DAMAGE THIS SCRIPT FILE
; DOES TO YOUR MACHINE, OR SOFTWARE.
;
; The files "TM4dPASS.HST" & "TM.USE" are updated with this script.
;
; ALL THE CHANGES THAT HAVE BEEN MADE ARE CLEARLY MARKED WITH AN
; ASTERISK " * ", THREW OUT THE SCRIPT IN THE COMMENT LINE!
;
; ** In ALL future host Script Menus. **
; ** Numbers will execute original, Host Options. **
; ** This will allow over 30 options on Every Menu. **
; ** If there is a need, There will now be room for their commands. **
;
; constant
;
TRUE = 1
FALSE = 0
FOREVER = TRUE
FILEDIR = "\HOST.DIR" ; temp. file for F)ile command
;
; global variable
integer local,userlevel,exist,xport,tmcolor
string username,password,filename,ch,file
integer NEWUSER,TMUSER,SILVER,GOLD,LEVEL5,LEVEL6,LEVEL7,LEVEL8,SYSOP,DETECTBAUD,INITIALBAUD,YELLTIME,YELLSOUND,CLOSESYSTEM
string HOSTDIR,DOWNLOADDIR,UPLOADDIR
;
integer oldAlarmTime,oldAlarmSound,oldZAuto,oldZRecovery,oldBaud,oldConnection
string oldDirUpload
string dospass,pass1,pass2
tmcolor = false
DOSPASS = "Ed Kapuscinski" ; * ESTABLISH DOS ENTRY PASSWORD (MAYBE 1 OR MORE CHARACTORS)
PASS1 = "TELEMATE412"
PASS2 = "SS #NUMBER"
; * ---------- Procedure Break ------------ ; * added to let show start
procedure StoreOptions ; * and finish of procedures
query alarmtime,oldAlarmTime
query alarmsound,oldAlarmSound
query dirupload,oldDirUpload
query zautodownload,oldZAuto
query zrecovery,oldZRecovery
query baud,oldBaud
query connection,oldConnection
endproc
; * ---------- Procedure Break ------------
procedure RestoreOptions
set alarmtime,oldAlarmTime
set alarmsound,oldAlarmSound
set dirupload,oldDirUpload
set zautodownload,oldZAuto
set zrecovery,oldZRecovery
set baud,oldBaud
set connection,oldConnection
endproc
; * ---------- Procedure Break -------------
procedure CheckDirectory string dir
integer l,pos
string ch,firstdir
strpos dir,";",pos
if pos>0
substr dir,1,pos-1,firstdir
dir = firstdir
endif
length dir,l
if l>0
substr dir,l,1,ch
if ch<>"\" and ch<>":"
concat dir,"\"
endif
endif
endproc
; * ---------- Procedure Break --------------
procedure HostConfig ; read the configuration file
string s,ch ; * new name TM4d_CFG.HST from the current directory
open "TM4d_CFG.HST"
if success
read s
atoi s,NEWUSER ; new user level
read s
atoi s,TMUSER ; * TmUser Security level
read s ; *
atoi s,SILVER ; * Alternate levels start here
read s ; *
atoi s,GOLD ; *
read s ; *
atoi s,LEVEL5 ; *
read s ; *
atoi s,LEVEL6 ; *
read s ; *
atoi s,LEVEL7 ; *
read s ; *
atoi s,LEVEL8 ; *
read s ; *
atoi s,SYSOP ; * New Sysop Level
read s ; *
atoi s,DETECTBAUD ; detect baud rate
read s
atoi s,INITIALBAUD ; initial baud rate
read s
atoi s,YELLTIME ; yell time
read s
atoi s,YELLSOUND ; yell sound
read HOSTDIR ; directory containing H*.HST
read DOWNLOADDIR ; download directory
read UPLOADDIR ; upload directory
read s
atoi s,CLOSESYSTEM ; open or close system
close
CheckDirectory HOSTDIR
CheckDirectory DOWNLOADDIR
CheckDirectory UPLOADDIR
set alarmtime,YELLTIME ; setup yell alarm
set alarmsound,YELLSOUND
set dirupload,UPLOADDIR ; setup upload directory
else
print "Cannot open TM4d_CFG.HST in the current directory"
print
print "Do you want to setup host mode (y/n)? ",
repeat
inputch ch
until success
if ch="y"
print ch
RestoreOptions
script "TM4dHCFG" ; chain to TM4dHCFG.SCR
else
print "n" ; abort host mode
print "Host mode aborted"
stop
endif
endif
endproc
; * -------- Procedure Break -------------
procedure HostBegin
set zautodownload,off
set zrecovery,off
set baud,INITIALBAUD
clear key ; clear keyboard buffer
clear com ; clear com buffer
clear text
print
print "Initializing modem"
put "^)", ; send modem answer string
if connected
print "Carrier signal is high, trying to make it reflect the online status"
put "~AT&C1^M~", ; make carrier signal reflect online status
if connected
print "Carrier signal is still high, host mode may not work correctly"
print "Please check your modem manual for correct DIP switch setting"
else
print "Carrier signal is now correct"
endif
print
endif
put "~ATQ0E0X4^M~", ; disable responds from modem
print " * * * TELEMATE ENHANCED HOST v4D * * *^M^J"
print " * * * COPYRIGHT by Edward Kapuscinski Jr * * *"
print " * * * THIS SCRIPT MAYBE DISTRIBUTED BUT I RETAIN ALL RIGHTS * * *^M^J"
print "Press 'L' for local mode, 'C' for configuration,"
print " [Esc] to exit and [Alt-H] to terminate user.^M^J"
print ".............................. Waiting for Caller ............................."
clear key ; clear keyboard buffer
clear com ; clear com buffer
endproc
; * ---------- Procedure Break ------------
procedure HostEnd
clear key ; clear keyboard buffer
clear com ; clear com buffer
print
print "Ending host mode"
put "^(","~", ; send modem init string
print
delete FILEDIR ; delete temp file
RestoreOptions
usage "Host: End session"
stop
endproc
; * ---------- Procedure Break ------------
procedure Disconnect ; end session
delay 10
if not local
hangup
endif
set connection,modem
local = FALSE
endproc
; * ---------- Procedure Break ------------
procedure Output string s
print s,
if not local
put s,
endif
endproc
; * ---------- Procedure Break ------------
procedure InputChar string ch ; input and display locally
repeat
if not local
getch ch
endif
if local or not success
inputch ch
if success
if ch = "^["
HostEnd ; abort by operator
endif
print ch,
endif
endif
until success or not connected
endproc
; * ---------- Procedure Break ------------
procedure InputEcho string ch ; input and echo to remote
InputChar ch
if not local
put ch,
endif
if ch = "^M" ; add line feed
Output "^J"
endif
endproc
; * ---------- Procedure Break ------------
procedure DotEcho string ch ; input and echo "." to remote
InputChar ch
if not local
if ch="^H" or ch="^M"
put ch,
else
put ".", ; echo with "."
endif
endif
if ch = "^M" ; add line feed
Output "^J"
endif
endproc
; * ---------- Procedure Break ------------
procedure InputString string str ; input a string
string ch
str = ""
repeat
InputEcho ch
if ch <> "^M"
if ch = "^H"
if str = ""
Output " "
else
Output " ^H"
endif
endif
concat str,ch
endif
until ch = "^M" or not connected
if str="" or not connected
success = FALSE
else
success = TRUE
endif
endproc
; * ---------- Procedure Break ------------
procedure InputFilename string filename,dir
string name
integer pos
InputString name ; input a filename
repeat
strpos name,":",pos ; strip drive part
if pos>0
strdel name,1,pos
endif
until pos=0 or not connected
repeat
strpos name,"\",pos ; strip directory part
if pos>0
strdel name,1,pos
endif
until pos=0 or not connected
if name="" or not connected
success = FALSE
filename = ""
else
success = TRUE
filename = dir
concat filename,"\" ; concat <dir>
strpos filename,"\\",pos
if pos>0
strdel filename,pos,1 ; avoid root directory"
endif
concat filename,name
endif
endproc
; * ---------- Procedure Break ------------
procedure InputPassword string password ; input password
password = ""
repeat
DotEcho ch
if ch <> "^M"
if ch = "^H"
if password = ""
Output ""
else
Output " ^H"
endif
endif
concat password,ch
endif
until ch = "^M" or not connected
if password="" or not connected
success = FALSE
else
success = TRUE
endif
endproc
; * ---------- Procedure Break ------------
procedure CheckUser string username,password,integer level,valid
integer found,pos1,pos2
string record,name,pass,lev
strpos username,";",pos1 ; record format: "first last;password#level"
strpos username,"#",pos2
if pos1>0 or pos2>0
valid = FALSE
return
endif
strpos password,";",pos1 ; check password for invalid character
strpos password,"#",pos2 ; prevent "#2" etc
if pos1>0 or pos2>0
valid = FALSE
return
endif
file = HOSTDIR
concat file,"TM4dPASS.HST" ; * New password list name
open file ; * passwords in TM4dPASS.HST
if not success
create file
endif
if not success
Output "System error, please call again later^M^J"
print "SYSOP: Cannot create TM4dPASS.HST" ; *
Disconnect
alarm "SYSOP: Cannot create TM4dPASS.HST, disk full ?" ; *
return
endif
found = FALSE
read record
while success and not found
strpos record,";",pos1 ; get fields from the record
strpos record,"#",pos2
if pos1>0 and pos2>0
substr record,1,pos1-1,name
substr record,pos1+1,pos2-pos1-1,pass
if name=username
found = TRUE
if pass=password
valid = TRUE
substr record,pos2+1,1,lev
atoi lev,level
username = name
else
valid = FALSE
endif
endif
endif
if not found
read record
endif
endwhile
if not found ; new users
if CLOSESYSTEM
valid = FALSE
else
seek -1 ; add user if open system
write username,";",password,"#",newuser ; * NewUserLevel is now NewUser
level = 1 ; assign new user to level 1
valid = TRUE
endif
endif
close
endproc
; * ---------- Procedure Break ------------
procedure Pause ; request a key
string ch
Output "Press [Enter] to continue "
InputEcho ch
Output "^M^J"
if ch<>"^M"
Output "^M^J"
endif
endproc
; * ---------- Procedure Break ------------
procedure TypeFile string filename,integer more
string ch ; display a file
integer i
i = 0
open filename
if not success
Output "File not found.^M^J"
delay 10
clear text
else
while success
inputch ch
if success and ch = "^C" ; operator break
clear com
Output "^M^J"
exit
endif
if not local
getch ch
if success and ch = "^C" ; caller break
clear com
Output "^M^J"
exit
endif
endif
read s ; display a line
Output s
Output "^M^J"
i = i+1
if i = 22 and more ; pause if <more> is TRUE
i = 0
Output "^M^JPress SpaceBar for -more-,or Control-C to End " ; * added
InputChar ch ; * Control-C ends display can be now be seen
if ch = "^C"
clear com
Output "^M^J"
exit
endif
Output "^M ^M" ; * added
endif
endwhile
close
if more
Pause
endif
endif
endproc
; * ---------- Procedure Break ------------
procedure Directory string dir ; display download directory
string cmd
cmd = "DIR " ; DIR
concat cmd,dir ; DIR \DOWNLOAD\
concat cmd,"*.* >" ; DIR \DOWNLOAD\*.* >
concat cmd,FILEDIR ; DIR \DOWNLOAD\*.* >\HOST.DIR
dos cmd ; shell to DOS
TypeFile FILEDIR,TRUE ; display \HOST.DIR
endproc
; * ---------- Procedure Break ------------
procedure FileTransfer string mode,protocol,filename
print "^M^JPlease start your transfer procedure or press Ctrl-X to abort^M^J"
delay 10
if mode = "r"
if filename="" ; receive batch files
receive protocol
else
receive protocol,filename ; receive single file
endif
else
send protocol,filename ; send multiple files
endif
if success
Output "File transfer completed^M^J"
Delay 10 ; * delay screen erase for possible error messages
else
Output "File transfer aborted^M^J"
delay 10 ; * delay screen erase for possible error messages
endif
Pause
endproc
; * ---------- Procedure Break ------------
procedure ShowScreen string tmscreen ; * Procedure (ShowScreen) is Copyrighted by Ed Kapuscinski jr
string file ; * saves current screen for later viewing
file = HOSTDIR ; * or instant viewing,
concat file,Tmscreen ; *
clear text ; *
TypeFile file,FALSE ; *
concat file,Tmscreen ; *
endproc ; *
; * ---------- Procedure Break ------------
procedure ShowNote string tmnote ; * Show Note will allow you to install as
string file ; * many Notices or Bullitons as you want to.
file = HOSTDIR ; * Providing that they are at the start of the script.
concat file,tmnote ; * To install more Notices, follow the way the keywords
FileExist file,exist ; * are placed, and copy as many as you like to.
if exist ; * I have also included blank notices in the Zipfile.
TypeFile file,TRUE ; *
endif ; *
endproc ; *
; * ---------- Procedure Break ------------
procedure WaitForCall ; wait for connected
integer i,len,valid,exist,baudrate
string file
set connection,modem
local = FALSE
xport = FALSE
tmcolor = FALSE ; * establish no color as default
while not connected ; wait for carrier signal
inputch ch ; sysop commands
if success
switch ch
case "^[": ; abort
HostEnd
case "L": ; local mode
set connection,computer ; this will set connected = 1
local = TRUE
case "C": ; configuration
RestoreOptions
script "TM4dHCFG" ; chain to TM4dHCFG.SCR
endswitch
endif
endwhile
if not local and DETECTBAUD
waitfor "CONNECT^M","CONNECT 1200","CONNECT 2400","CONNECT 9600","CONNECT 19200","CONNECT 38400",10
if found
switch found
case 1: baudrate = 300
case 2: baudrate = 1200
case 3: baudrate = 2400
case 4: baudrate = 9600
case 6: baudrate = 19200
case 7: baudrate = 38400 ; * added higher baudrate
endswitch
set baud,baudrate
Output "Connected at "
if not local
put baudrate,"^M^J"
endif
print baudrate
endif
endif
Output "^M^J"
delay 5
clear com
delay 5
file = HOSTDIR
Output " * ╔═════════════════════════════════════════╗ *^M^J" ; *
Output " * * * * * ║ If your Terminal Supports Ansi Graphics ║ * * * * *^M^J" ; *
Output " * ╚═════════════════════════════════════════╝ *^M^J^M^J" ; *
Output "Would you like to view Color Menus [y/N]? " ; * No color is the Default but Pressing "C" will toggle it. ; *
InputString ch
if ch="y"
tmcolor = true
else
tmcolor = false
endif
if tmcolor
ShowScreen "tmhelo_a.hst" ; * show ansi hello screen
else
ShowScreen "tmhelo_x.hst" ; * show text hello screen
endif
i = 1
len = 0
username = "" ; enter name (at most 3 times)
while i<=3 and len<4 and connected
Output "Please enter your First and Last name: "
InputString username
i = i+1
length username,len ; check the length of name
if len<4
Output "Name too short, please try again^M^J^M^J"
delay 10
else
Output "( " ; * made full sentence out of logon
Output USERNAME ; * logon name now shown in braces
Output " ),Is This Correct " ; *
Output "[y/N]? " ; *
InputString ch ; * changed [Y/n?] default is No
if not ch="y" ; * Only "Y" & enter are excepted
len=0 ; * After 3 tries,caller is disconnected
endif
endif
endwhile
if len<4 and connected
Output "Goodbye^M^J"
delay 10
Disconnect
else
i = 1
len = 0
password = "" ; enter password (at most 3 times)
while i<=3 and len<4 and connected
Output "Password: "
InputPassword password
i = i+1
length password,len ; check the length of ot
if len<4
Output "Password too short, please try again^M^J^M^J"
endif
endwhile
if len>=4 ; check password and get user level
CheckUser username,password,userlevel,valid
endif
if (len<4 or not valid) and connected
Output "Invalid password, access denied^M^J^M^J"
Disconnect
else
log = "Host: Connect to "
concat log,username
usage log
if tmcolor = true
if userlevel=1
ShowNote "tmnote1a.hst" ; * Show Ansi New User Note
clear text
ShowNote "tm4d_nta.hst" ; * Show Ansi Enhanced Note
clear text ; * clear screen
ShowNote "Yournt_a.hst" ; * Show Ansi YourNote Notice
elseif userlevel>1
ShowNote "tmnote2a.hst" ; * Show Ansi Host User Note
clear text ; * clear screen
ShowNote "tm4d_nta.hst" ; * Show Ansi Enhanced Note
clear text ; * clear screen
ShowNote "Yournt_a.hst" ; * Show Ansi YourNote
endif
else
if userlevel=1
ShowNote "tmnote1x.hst" ; * Show Text New User Note
clear text
ShowNote "tm4d_ntx.hst" ; * Show Text Enhanced Host Note
clear text
ShowNote "Yournt_x.hst" ; * Show Text YourNote Note
elseif userlevel>1
ShowNote "tmnote2x.hst" ; * Show Text Host User Note
clear text
ShowNote "tm4d_ntx.hst" ; * Show Text Enhanced host note
clear text
ShowNote "Yournt_x.hst" ; * Show Text YourNote Note
endif
endif
endif
endif
endproc
; * ---------- Procedure Break ------------
procedure ChatMode ; chat mode
integer x
string rch,lch
Output "You have Entered the Twilight Zone:^M^J"
Keystroke "^MThis is your Sysop Speaking, What can I do for you?^M^J" ; * changed
repeat
if not local
getch rch
if success
put rch,
if rch = "^M"
Output "^J"
endif
wherex x
if rch = " " and x > 65
Output "^M^J"
endif
endif
endif
inputch lch
if success and lch<>"^[" ; abort if sysop press [Esc]
Output lch
if lch = "^M"
Output "^J"
endif
wherex x
if lch = " " and x > 65
Output "^M^J"
endif
endif
until lch="^[" or not connected
Output "^MSpeak your Mind, I always say.^M^JIt's been a pleasure!^M^J" ; * place what you want displayed here
delay 10
Output "^M^JChat mode end:^M^J^M^J"
Pause
endproc
; * ---------- Procedure Break ------------
procedure DoCommand ; do a command
if xport
clear text ; * added
if userlevel=NEWUSER ; * Using the "=" Only New User see's this menu
Output " Welcome to The New Enhanced Telemate Host v4d ( "
Output username
Output " )!^M^J"
Output "╓─────────────────────────────────────────────────────────────╖^M^J" ; * Numbers will now be used to execute
Output "║ To TOGGLE:Press (5)ExPert * (C) Color Mode * (O)Options ║^M^J" ; * Original Host Options.
Output "╟─────────────────────────────────────────────────────────────╢^M^J" ; *
Output "║ (2)D/L, (3)CHAT, (4)TYPE, (5)EXPERT, (6)FILES, (G)GOODBYE ║^M^J" ; *
Output "╚═════════════════════════════════════════════════════════════╝^M^J" ; *
Output "Command 2,3,4,5,6,C,O,[G]: " ; * expert mode
elseif userlevel>NEWUSER ; * Every level except Newuser see's this Menu ; *
Output " Well now that you are a Host User " ; *
Output username ; *
Output ", Give till it HURTS!^M^J" ;
Output "╓─────────────────────────────────────────────────────────────╖^M^J" ; * Host User and NewUser Expert Menus
Output "║ To Toggle:Press (5)ExPert * (C)Color Mode * (O)Options ║^M^J" ; *
Output "╟─────────────────────────────────────────────────────────────╢^M^J" ; *
Output "║ (1)U/L, (2)D/L, (3)CHAT, (4)TYPE, (5)EXPERT, (6)FILES, ║^M^J" ; *
Output "║ (7)SHELL, (8)BATCH, (9)SHUTDOWN <SYSOP ONLY) (G)GOODBYE ║^M^J" ; *
Output "╚═════════════════════════════════════════════════════════════╝^M^J" ; *
Output "Command 1,2,3,4,5,6,C,O,(7,8,9),[G]: " ; expert mode
endif
else
if userlevel=SYSOP ; * menu selection starts here
Output "^M^J^M^J" ; * menu will be chosen by userlevel
if tmcolor = true ; *
ShowScreen "Tm4d9a.hst" ; *
Output "Command: "
else
ShowScreen "Tm4d9x.hst" ; *
Output "Command: "
endif
elseif userlevel=LEVEL8 ; * start of user menu selection
Output "^M^J^M^J" ; *
if tmcolor = true ; *
ShowScreen "Tm4d8a.hst" ; * show ansi screen
Output "Command: " ; *
else
ShowScreen "Tm4d8x.hst" ; * show text screen
Output "Command: " ; *
endif
elseif userlevel=LEVEL7 ; *
Output "^M^J^M^J" ; *
if tmcolor = true ; *
ShowScreen "Tm4d7a.hst" ; * show ansi screen
Output "Command: " ; *
else
ShowScreen "Tm4d7x.hst" ; * show text screen
Output "Command: " ; *
endif
elseif userlevel=LEVEL6 ; *
Output "^M^J^M^J" ; *
if tmcolor = true ; *
ShowScreen "tm4d6a.hst" ; * show ansi screen
Output "Command: " ; *
else
file = HOSTDIR ; *
ShowScreen "Tm4d6x.hst" ; * show text screen
Output "Command: " ; *
endif
elseif userlevel=LEVEL5 ; *
Output "^M^J^M^J" ; *
if tmcolor = true ; *
ShowScreen "tm4d5a.hst" ; * show ansi screen
Output "Command: "
else
ShowScreen "tm4d5x.hst" ; * show text screen
Output "Command: " ; *
endif
elseif userlevel=GOLD ; *
Output "^M^J^M^J" ; *
if tmcolor = true ; *
ShowScreen "Tm4d4a.hst" ; * show ansi screen
Output "Command: " ; *
else
file = HOSTDIR ; *
ShowScreen "Tm4d4x.hst" ; * show text screen
Output "Command: " ; *
endif
elseif userlevel=SILVER ; *
Output "^M^J^M^J" ; *
if tmcolor = true ; *
ShowScreen "Tm4d3a.hst"
Output "Command: " ; *
else
ShowScreen "Tm4d3x.hst"
Output "Command: " ; *
endif
elseif userlevel=TMUSER ; *
Output "^M^J^M^J" ; * This menu would be the standard
if tmcolor = true ; *
ShowScreen "Tm4d2a.hst" ; * show ansi screen
Output "Command: " ; *
else
ShowScreen "Tm4d2x.hst" ; * show text screen
Output "Command: " ; *
endif
elseif userlevel=NEWUSER ; * Start of New User Menu
Output "^M^J^M^J" ; * Caller will not have
if tmcolor = true
ShowScreen "Tm4d1a.hst" ; * show ansi screen
Output "Command: " ; *
else
ShowScreen "Tm4d1x.hst" ; * show text screen
Output "Command: " ; *
endif
endif
endif
InputEcho ch
if ch<>"^M"
Output "^M^J"
endif
switch ch
case "6": ; file directory
clear text ; * clears old, for the new display
Directory DOWNLOADDIR
case "4": ; type a file
Output "^M^JEnter filename: "
InputFilename filename,DOWNLOADDIR
if success
clear text
TypeFile filename,TRUE
endif
case "1":
if userlevel<TMUSER ; * if userlevel is lest then 2
if tmcolor=true ; * can not upload file to host
ShowScreen "tmrulesa.hst"
usage "Upload Attempt:"
pause
else
ShowScreen "tmrulesx.hst"
usage "Upload Attempt:" ; * write to usage log
pause
endif
else
if tmcolor = true ; * color check
ShowScreen "Tmprot_a.hst" ; * ansi protocal menu
else
ShowScreen "Tmprot_x.hst" ; * text protocal menu
endif
Output "Select protocol: "
InputEcho protocol
Output "^M^J"
if local
Output "Function not available in local mode^M^J"
delay 20
else
switch protocol
case "X","R":
Output "Enter filename: "
InputFilename filename,""
if success
FileTransfer "r",protocol,filename
endif
case "Z","S","T","M","Y","B","G":
FileTransfer "r",protocol,""
endswitch
endif
endif
case "2": ; download a file
Output "^M^J"
if tmcolor = true ; *
ShowScreen "Tmprot_a.hst" ; * show ansi protocal menu
else
ShowScreen "Tmprot_x.hst" ; * show text protocal menu
endif
Output "Select protocol: "
InputEcho protocol
Output "^M^J"
if local
Output "Function not available in local mode^M^J"
delay 10
else
switch protocol
case "X","Y","Z","S","T","M","R","B","G": ; * removed hslink till more test
Output "Enter filename: "
InputFilename filename,DOWNLOADDIR
if success
FileTransfer "s",protocol,filename
endif
endswitch
endif
case "3": ; yell
delay 5
clear text ; * clears main menu
Output "^M^J" ; * blank line
Output "╓─────────────────────────────────────╖^M^J" ; * added
Output "║ I'll be with you in just a Moment? ║^M^J" ; * added
Output "╚═════════════════════════════════════╝^M^J" ; * added
alarm "Caller would like to speak to you?^JPress [Enter] to accept, [Esc] to deny"
if success
clear text ; * chat mode is now full screen
print "^M^JSYSOP: Press [Esc] to Terminate Chat Mode^M^J" ; * changed text
ChatMode ; * added spaces
else
delay 10
clear text ; * clear old menu
Output "^M^J" ; * blank line
Output "╓─────────────────────────────────────╖^M^J" ; * added
Output "║ Maybe Later, When I have more time? ║^M^J" ; * added
Output "╚═════════════════════════════════════╝^M^J" ; * added
Output "^M^J"
delay 20
endif
case "5": ; toggle export mode
xport = not xport
case "C":
tmcolor = not tmcolor
case "G": ; goodbye
file = HOSTDIR
Output "Do you wish to leave Host Mode? [y/N]? " ; * Caller now has Option
InputString ch
if ch="y"
if tmcolor = true
concat file,"TMBYE_A.HST" ; * color goodbye notice
TypeFile file,false
delay 30 ; * increased delay for better viewing
Disconnect
else
concat file,"TMBYE_X.HST" ; * text goodbye notice
TypeFile file,false
delay 30 ; * increased delay for better viewing
Disconnect
endif
endif
case "7": ; shell to DOS
if userlevel<SYSOP
Output "^M^JShell out to Dos!^M^J" ; * put menu title in script
Output "Sorry, this command is for Sysop only!^M^J"
usage "Shellout Attempt: (7)" ; * Writes shellout was tried in log file
delay 20
else
Output "Please Enter the Correct Pass Word? " ; * PASS CHARACTOR or WORD NEEDED TO SHELLOUT
inputstring ch ; * PASSWORD maybe any (word,phrase,or single charactor)
if ch = DOSPASS ; * I used my Name in this illustration to show that spaces are acceptable also!
if local ; local mode shell to DOS
Output "Shelling to DOS ... ^M^J"
delay 5
dos
Output "Return from DOS shell^M^J"
delay 5
else
file = HOSTDIR
concat file,"HSHELL.BAT"
fileexist file,exist ; check for HSHELL.BAT
if exist
Output "Shelling to DOS ... ^M^J"
delay 5
dos file
Output "Return from DOS shell^M^J"
delay 5
else
Output "SYSOP: Cannot find HSHELL.BAT^M^J"
endif
endif
else
Output "Your name will be entered in the BadNames List!^M^J" ; * this is usally enough to stop any
usage "Attempt Shellout-PASSWORD ERROR!" ; * intruder from tampering with your system!
pause ; * YOUR THE BOSS AROUND HERE
delay 10
DISCONNECT
endif
endif
; * Place include file here to access the other menus.
; * If you need 22 more options, there here.
; * Like this: #include "d:\tm\script\extra.scr"
; * The OPTIONS BELOW are the options that are in "Include file","extra.scr".
; * To make the host script faster. Remove the lines from "952-1120".
; * They are here as sample options only. Availible not to all Userlevels.
case "B":
if userlevel=2 or userlevel=3 or userlevel=9 ; * In this example, every caller except 2,3, or 9 see's the menu
Output "Your Security level is not enough for this command!^M^J"
delay 10
else
Output "This would be Level (Menu 2)!^M^J"
pause
endif
case "D":
if userlevel<>sysop
Output "Your Security level is not enough for this command!^M^J"
delay 10
else
Output "This would be Level (Menu 3)!^M^J"
pause
endif
case "E":
if userlevel<>2 ; * everyone but userlevel 2
Output "This would be Level (Menu 5)!^M^J" ; * sees the menu. this is very handy if
pause ; * you have a problem user.
else
Output "Your Security level is not enough for this command!^M^J"
delay 30
endif
case "F":
if userlevel<>6
Output "Your Security level is not enough for this command!^M^J"
delay 10
else
Output "This would be Level (Menu 5)!^M^J"
pause
endif
case "H":
if userlevel<>4
Output "Your Security level is not enough for this command!^M^J"
delay 10
else
Output "This would be Level (Menu 5)!^M^J"
pause
endif
case "I":
if userlevel<>8
Output "Your Security level is not enough for this command!^M^J"
delay 10
else
Output "This would be Level (Menu 7)!^M^J"
pause
endif
case "J":
if userlevel<>9
Output "Your Security level is not enough for this command!^M^J"
delay 10
else
Output "This would be Level (Menu 8)!^M^J"
pause
endif
case "K":
if userlevel<>sysop
Output "Your Security level is not enough for this command!^M^J"
delay 10
else
Output "This would be Level (Menu 9)!^M^J"
pause
endif
case "M":
if userlevel=sysop or userlevel=2
Output "Your Security level is not enough for this command!^M^J"
delay 10
else
Output "This would be Level (Menu 11)!^M^J"
pause
endif
case "N":
if userlevel=1
else
Output "This would be Level (Menu 12)!^M^J"
pause
endif
case "P":
if userlevel<>sysop
Output "Your Security level is not enough for this command!^M^J"
delay 10
else
Output "This would be Level (Menu 14)!^M^J"
pause
endif
case "Q":
if userlevel<>sysop
Output "Your Security level is not enough for this command!^M^J"
delay 10
else
Output "This would be Level (Menu 15)!^M^J"
pause
endif
case "R":
if userlevel<>sysop
Output "Your Security level is not enough for this command!^M^J"
delay 10
else
Output "This would be Level (Menu 16)!^M^J"
pause
endif
case "S":
if userlevel<>sysop
Output "Your Security level is not enough for this command!^M^J"
delay 10
else
Output "This would be Level (Menu 17)!^M^J"
pause
endif
case "T":
if userlevel<>sysop
Output "Your Security level is not enough for this command!^M^J"
delay 10
else
Output "This would be Level (Menu 18)!^M^J"
pause
endif
case "U":
if userlevel<>sysop
Output "Your Security level is not enough for this command!^M^J"
usage "OPTION (U) ATTEMPT: level 9 required"
delay 10
else
Output "This would be Level (Menu 19)!^M^J"
pause
endif
case "V":
if userlevel<>sysop
Output "Your Security level is not enough for this command!^M^J"
usage "OPTION (V) ATTEMPT: level 9 required"
delay 10
else
Output "This would be Level (Menu 20)!^M^J"
pause
endif
case "W":
if userlevel<>sysop
Output "Your Security level is not enough for this command!^M^J"
usage "OPTION (W) ATTEMPT: level 9 required"
delay 10
else
Output "This would be Level (Menu 21)!^M^J"
pause
endif
case "X":
if userlevel<>sysop
Output "Your Security level is not enough for this command!^M^J"
usage "OPTION (X) ATTEMPT: level 9 required"
delay 10
else
Output "This would be Level (Menu 22)^M^J"
pause
endif
case "Y":
if userlevel=2 or userlevel=9
Output "This would be level (Menu 23)!^M^J"
Output "If you can see this. You must be ( " ; * usersname is in option
Output username
Output " )!^M^J"
Output "You must be a Host User, Level 2!"
Output "Know one else would be able to see this message!^M^J"
pause
else
Output "Your security level is not high enough for this command!^M^J"
usage "Option Attempt:(Y) levels 2,8,or 9 required"
pause
endif
case "O":
if tmcolor = true
ShowScreen "optionsa.hst" ; * Show Ansi Option Screen
pause
else
ShowScreen "optionsx.hst" ; * Show Text Option Screen
pause
endif
case "Z":
if userlevel=1 or userlevel=3 or userlevel=5 or userlevel=7 or userlevel=9
Output "This would be level (Menu 24)!^M^J"
Output "What do you think of my Host Script ( "
Output username
Output " )?^M^J"
Output "Know one else would be able to see this message!^M^J"
pause
else
Output "Your security level is not high enough for this command!^M^J"
usage "Option Attempt: (Z) levels 1,3,5,7, or 9 required"
pause
endif
case "8": ; run remote program
if userlevel<SYSOP
Output "^M^JRun Batch File!^M^J" ; * put menu title in script
Output "Sorry, this command is for Sysop Only!^M^J"
usage "Run Attempt: (8)Batch"
delay 20
else
Output "Please Enter the Correct PassWord? " ; * DOS PASS CHARACTOR or WORD NEEDED TO SHELLOUT
inputstring ch ; * Establish at start of script in variable
if ch = DOSPASS
file = HOSTDIR
if local ; run HLOCAL.BAT if local mode
concat file,"HLOCAL.BAT"
fileexist file,exist
if exist
Output "Loading external program ... ^M^J"
dos file
Output "Return from external program^M^J"
else
Output "SYSOP: Cannot find HLOCAL.BAT^M^J"
delay 20
endif
else ; run HREMOTE.BAT if remote mode
concat file,"HREMOTE.BAT"
fileexist file,exist
if exist
Output "Loading remote program ... ^M^J"
dos file
Output "Return from remote program^M^J"
else
Output "SYSOP: Cannot find HREMOTE.BAT^M^J"
endif
endif
else
Output "You must enter the proper Pass Word!^M^J"
pause
endif
endif
case "9": ; shut down host mode
if userlevel<SYSOP
Output "^M^JEnd Host Mode!^M^J" ; * put menu title in script
Output "Sorry, this command is for Sysop Only!^M^J"
usage "Run Attempt: (9)Shutdown"
delay 20
else
Output "^M^JShut Down Host Mode!^J^MAre you sure [y/N]? " ; * added info
InputString ch
if ch="y"
Output "Shutting down host mode^M^J"
Disconnect
HostEnd
endif
endif
endswitch
endproc
; * ---------- Procedure Break ------------
;
; begin main program
;
StoreOptions
HostConfig ; read configuration file TM4d_CFG.HST
usage "Host: Begin session"
while FOREVER
HostBegin ; initial mode
WaitForCall ; wait for a call
while connected
DoCommand ; do commands
endwhile
endwhile